class DetalleFactura < ActiveRecord::Base
  attr_accessor :should_destroy
  belongs_to  :factura
  has_one :bonificacion_detalle

  validates_presence_of      :producto_id, :unidades
  validates_numericality_of  :unidades, :only_integer => true
  
  def should_destroy?
    should_destroy.to_i == 1
  end
end
